<template>
    <div>详情页-{{ $route.query.id }}</div>
    <button @click="$router.back()">返回</button>
</template>
<script setup>
import { onMounted } from 'vue';
import { useRoute } from 'vue-router'
const route = useRoute()
onMounted(() => {
    loadData()
})
const loadData = () => {
    // 获取查询字符串参数
    console.log('ajax请求id=', route.query.id)
}

</script>